#include <iostream>
#include <stdexcept>

using namespace std;

double divideNumbers(double inNumerator, double inDenominator) {
    if (inDenominator == 0) {
        throw runtime_error("inDenominator can't is 0.");
    }

    return inNumerator / inDenominator;
}

int main(int argc, char const *argv[])
{
    
    try
    {
        cout << divideNumbers(2.5, 0.5) << endl;
        cout << divideNumbers(2.3, 0) << endl;  
    }
    catch(const std::exception& e)
    {
        std::cerr << e.what() << '\n';
    }
    
    return 0;
}
